<!DOCTYPE html>
<html>
  <head>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta charset="UTF-8">
    <title>Cola-UI 客户端框架</title>
    <base href="/">
    <link rel="stylesheet" type="text/css" href="./resources/nprogress/nprogress.css">
    <script src="./resources/nprogress/nprogress.js"></script>
    <link rel="stylesheet" type="text/css" href="./resources/cola-ui/semantic.css">
    <link rel="stylesheet" type="text/css" href="./resources/cola-ui/cola.css">
    <link rel="stylesheet" type="text/css" href="./common/common.css">
    <link rel="stylesheet" type="text/css" href="./example/master-detail.css">
  </head>
  <body>
    <script type="text/javascript">
      NProgress.configure({showSpinner: false, minimum: 0.3})
      NProgress.start();
    </script>
    <div class="ui segment">
      <div id="categoryPager" class="secondary">
        <div class="header item">产品分类</div>
        <div class="control item">
          <div c-widget="button;icon:plus;caption:添加; click:addCategory" class="teal"></div>
        </div>
        <div class="right menu">
          <div page-code="pages" class="item"></div>
        </div>
      </div>
      <div id="categoryList"></div>
    </div>
    <div class="ui segment">
      <div id="productPager" class="secondary">
        <div class="header item">产品列表</div>
        <div class="control item">
          <div c-widget="button;icon:plus;caption:添加; click:addProduct" class="teal"></div>
        </div>
        <div class="right menu">
          <div page-code="pages" class="item"></div>
        </div>
      </div>
      <div id="productList"></div>
    </div>
    <div id="categoryLayer" class="content-background">
      <div class="caption-bar"><i class="icon user"></i><span class="caption">产品分类维护</span>
        <div class="tools">
          <div c-widget="button; caption:返回; click:categoryCancel; icon:angle right; iconPosition:right" class="basic circular"></div>
        </div>
      </div>
      <div class="ui segment basic">
        <div class="ui form">
          <div class="fields">
            <div class="field three wide">
              <label>Category Name</label>
              <div c-widget="Input; bind:customCategory.categoryName; "></div>
            </div>
          </div>
          <div class="fields">
            <div class="field three wide">
              <label>Category Description</label>
              <textarea c-bind="customCategory.description"></textarea>
            </div>
          </div>
        </div>
      </div>
      <div class="ui segment basic">
        <div c-widget="button; caption:Save; icon:checkmark; click:categorySave" class="big positive circular"></div>
        <div c-widget="button; caption:Cancel; icon:remove; click:categoryCancel" class="big negative circular"></div>
      </div>
    </div>
    <div id="productLayer" class="content-background">
      <div class="caption-bar"><i class="icon user"></i><span class="caption">产品信息维护</span>
        <div class="tools">
          <div c-widget="button; caption:返回; click:productCancel; icon:angle right; iconPosition:right" class="basic circular"></div>
        </div>
      </div>
      <div class="ui segment basic">
        <div class="ui time-line">
          <div class="items">
            <div class="item">
              <div class="label">Category Information</div>
              <div class="icon"><i class="icon cube"></i></div>
              <div class="content">
                <div class="ui form">
                  <div class="fields">
                    <div class="field three wide">
                      <label>Category ID</label>
                      <div c-widget="Input; bind:categorys.id; readOnly:true"></div>
                    </div>
                    <div class="field three wide">
                      <label>Category Name</label>
                      <div c-widget="Input; bind:categorys.categoryName;readOnly:true"></div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <div class="item">
              <div class="label">Basic Information</div>
              <div class="icon"><i class="icon cube"></i></div>
              <div class="content">
                <div class="ui form">
                  <div class="fields">
                    <div class="field three wide">
                      <label>Product Name</label>
                      <div c-widget="Input; bind:customProduct.productName;"></div>
                    </div>
                  </div>
                  <div class="fields">
                    <div class="field three wide">
                      <label>quantityPerUnit</label>
                      <div c-widget="Input; bind:customProduct.quantityPerUnit;"></div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <div class="item">
              <div class="label">Other Information</div>
              <div class="icon"><i class="icon cube"></i></div>
              <div class="content">
                <div class="ui form">
                  <div class="fields">
                    <div class="field three wide">
                      <label>Unit Price</label>
                      <div c-widget="Input; bind:customProduct.unitPrice;"></div>
                    </div>
                    <div class="field three wide">
                      <label>Units In Stock</label>
                      <div c-widget="Input; bind:customProduct.unitsInStock;"></div>
                    </div>
                    <div class="field three wide">
                      <label>Units On Order</label>
                      <div c-widget="Input; bind:customProduct.unitsOnOrder;"></div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="ui segment basic">
        <div c-widget="button; caption:Save; icon:checkmark; click:productSave" class="big positive circular"></div>
        <div c-widget="button; caption:Cancel; icon:remove; click:productCancel" class="big negative circular"></div>
      </div>
    </div>
  </body>
  <script src="./resources/jquery/jquery-2.1.3.js"></script>
  <script src="./resources/jquery/jquery.cookie.js"></script>
  <script src="./resources/cola-ui/3rd.js"></script>
  <script src="./resources/cola-ui/semantic.js"></script>
  <script src="./resources/cola-ui/cola.js" charset="UTF-8"></script>
  <script src="./common/common.js"></script>
  <script src="./example/master-detail.js"></script>
</html>